package redpacket.dto;

import jakarta.validation.constraints.DecimalMin;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.math.BigDecimal;

@Data
public class CreatePacketRequest {
    @NotNull
    private Long senderId;

    @NotNull @DecimalMin(value = "0.01")
    private BigDecimal totalAmount;

    @NotNull @Min(1)
    private Integer totalCount;

    @NotNull @Min(1)
    private Integer expireSeconds; // how long until expire

    @NotNull @Min(1) @Max(2)
    private Integer type; // 1=avg, 2=random
}
